import request from "@/axios/request";
import url from "@/axios/url";
const { mesUrl, adminUrl } = url();
// 导出url
export const exportUrl = `${mesUrl}mesScanKeyParts/export`;
// 分页查询
export function getList (params = {}) {
  return request({
    url: `${mesUrl}mesScanKeyParts`,
    method: "get",
    params,
  });
}
// 新增
export function rowCreate (data = {}) {
  return request({
    url: `${mesUrl}mesScanKeyParts`,
    method: "post",
    data,
  });
}
// 修改
export function rowUpdate (data = {}) {
  return request({
    url: `${mesUrl}mesScanKeyParts`,
    method: "put",
    data,
  });
}
// 删除
export function rowDel (id) {
  return request({
    url: `${mesUrl}mesScanKeyParts/${id}`,
    method: "put",
  });
}
// 详情
export function rowDetail (id) {
  return request({
    url: `${mesUrl}mesScanKeyParts/info/${id}`,
    method: "get",
  });
}

// 查询线体编码列表
export function getLineCodeList (params) {
  return request({
    url: `${adminUrl}baseFactoryModeling/children`,
    method: "get",
    params,
  });
}
// 查询工序编码列表
// export function getProcessCodeList() {
//   return request({
//     url: `${adminUrl}baseFactoryModeling/select?level=5`,
//
//     method: 'get',
//   });
// }
// 查询采集工位编码列表
export function getWorkCellCodeList () {
  return request({
    url: `${adminUrl}baseFactoryModeling/select?level=5`,

    method: "get",
  });
}
// 查询采集班组编码列表
export function getWorkTeamCodeList () {
  return request({
    url: `${mesUrl}mesTeam/list`,
    method: "get",
  });
}
// // 查询采集班次编码列表
// export function getWorkShiftCodeList() {
//   return request({
//     url: `${adminUrl}baseFactoryModeling/select?level=5`,
//     method: 'get',
//   });
// }
// // 查询工单编码列表
// export function getWorkOrderCodeList() {
//   return request({
//     url: `${adminUrl}baseFactoryModeling/select?level=5`,
//
//     method: 'get',
//   });
// }
// // 查询工单名称列表
// export function getWorkOrderNodeList() {
//   return request({
//     url: `${adminUrl}baseFactoryModeling/select?level=5`,
//
//     method: 'get',
//   });
// }
